#coding:utf-8
"""
时间 xml信息

<clock offset='localtime'/>

"""

class Clock:
    
    _dumpxml_xpath = "/domain/clock"
    
    def __init__(self,offset=None):
        self._offset = offset;
        
    def get_offset(self):
        return self._offset;
    def set_offset(self,offset):
        self._offset = offset;
    
    offset = property(get_offset,set_offset);
    
    """
    生成 时间 xml 信息
    """
    def get_xml_config(self):
        if not self.offset:
            return "";
        return """  <clock offset="%s"/>""" % self.offset;